package com.hxh.bank.branch.bean;

import com.hxh.bank.branch.spider.AppGateSpider;
import com.hxh.bank.branch.spider.BankBranchSpider;
import com.hxh.bank.branch.spider.FiveCmSpider;
import com.hxh.bank.branch.spider.JsonCnSpider;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * @author huangxunhui
 * Date: Created in 2021/5/16 20:41
 * Utils: IntelliJ IDEA
 * Description: 支行爬虫初始化
 */
@Component
public class BankBranchSpiderBean {

    @Bean
    public BankBranchSpider bankBranchSpider() {
        JsonCnSpider jsonCnSpider = new JsonCnSpider();
        FiveCmSpider fiveCmSpider = new FiveCmSpider();
        AppGateSpider appGateSpider = new AppGateSpider();
        jsonCnSpider.setNextSpider(fiveCmSpider);
        fiveCmSpider.setNextSpider(appGateSpider);
        return jsonCnSpider;
    }
}
